package game.players.states;

import game.ball.Possessed;
import game.ball.SoccerBall;
import game.players.SoccerPlayer;

import com.uqbar.vainilla.DeltaState;

public class CPUMateWithoutBall extends WithoutBall {
	
	public CPUMateWithoutBall(SoccerPlayer player) {
		super(player);
	}

	@Override
	public void update(DeltaState deltaState) {
		// TODO INTELIGENCIA ARTIFICIAL
		this.checkBallCollides();
	}

	@Override
	public void changeBallPlayerStates(SoccerBall ball, SoccerPlayer player) {
		player.setState(new UserWithBall(player));
		ball.setState(new Possessed(ball, player));
		player.getScene().setUserPlayer(player);
		player.addUserPlayerMark();
	}

}
